-
Notifications
You must be signed in to change notification settings - Fork 64
Add dynamic-codecs package
#289
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
🦋 Changeset detectedLatest commit: 0591177 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
This stack of pull requests is managed by Graphite. Learn more about stacking. Join @lorisleiva and the rest of your teammates on |
00bba59 to
71b0830
Compare
8a805f1 to
d0fdc21
Compare
lorisleiva
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Quick self-review
d0fdc21 to
0591177
Compare
ngundotra
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Looking forward to dynamic-parsers package!

This PR adds a new
dynamic-codecspackage that allows us to createCodecinstances on demand (as defined in@solana/codecs) from Codama nodes.This package is a bit low-level since the intention is for it to be used inside another
dynamic-parserspackage which will be created shortly after this PR is merged. The goal of thedynamic-codecspackage is to focus on the foundations of creating codecs for any nodes.Namely, it offers a
getNodeCodecfunction that, given the fullNodePathof a node, returns aCodec<unknown>that enables encoding and decoding data for that node. Here's an example:See the README of the new package for more information.